import useRequest from "@/api/useRequest";

export class sysParamController {

  static saveNotice(data:any): Promise<any> {
    return useRequest({
      url: "/api/sysParam/saveNotice",
      method: "post",
      data
    })
  }


  static saveUpdateConfig(data:any): Promise<any> {
    return useRequest({
      url: "/api/sysParam/saveUpdateConfig",
      method: "post",
      data
    })
  }

  static getNoticeAndHistory(): Promise<any> {
    return useRequest({
      url: "/api/sysParam/getNoticeAndHistory",
      method: "get"
    })
  }

  static getParam(key:string): Promise<any> {
    return useRequest({
      url: "/api/sysParam/getParam/"+key,
      method: "get"
    })
  }


  static addParam(data:any): Promise<any> {
    return useRequest({
      url: "/api/sysParam/addParam",
      method: "post",
      data
    })
  }

  static getAllParam(): Promise<any> {
    return useRequest({
      url: "/api/sysParam/getAllParam",
      method: "get"
    })
  }

  static saveSystemOption(data:any):Promise<any>{
    return useRequest({
      url: "/api/sysParam/saveSystemOption",
      method: "post",
      data
    })
  }
}
